home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 4 / CU Amiga Magazine's Super CD-ROM 04 (1996)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1996-11].iso / magazine / psion / utils / tree202.lzx / tree.txt < prev    next >
Text File  |  1993-04-06  |  5KB  |  113 lines

  1.     Tree by Rick Andrews
  2.  
  3. Tree is a disk contents utility for the Psion Series 3 pocket
  4. computer. It is freeware.
  5.  
  6. This document is the user guide for the Tree utility version 2.02,
  7. dated 4 April 93.
  8.  
  9. Installation:
  10. 1. Copy TREE202.OPA into the \APP directory on M:, A: or B:.
  11. 2. Install onto the system screen using Psion-I.
  12. 3. Thats all!
  13.  
  14. The TREE202.OPL and TREE.PIC files are the source code and icon
  15. bitmap respectively, which are used to produce the .OPA file. In case
  16. you can't guess, the icon represents a solid-state disk!
  17.  
  18. Freeware:
  19. This utility is freeware; there is no registration fee to pay, and
  20. you may copy the program freely. If you have any comments, find any
  21. bugs or whatever, please contact me :- Rick Andrews, 164 Castle Hill,
  22. Reading, United Kingdom  RG1 7RP
  23.  
  24. The software:
  25. The following article first appeared in Ipso Facto, July 92 issue...
  26.  
  27. ---------------------------------------------------------------------
  28.  
  29. Have you ever lost a file on your Series 3 - or rather, forgotten
  30. where you put it? Or wonder why the internal drive is using 30K more
  31. than usual, only to find two copies of your phone list lying around.
  32. (Remember that sorted one you put into \MISC last week?) It can be a
  33. bit of a pain having to play hide-and-seek using the system directory
  34. (psion-*) command, even more so with the early versions of the OS
  35. that don't have it! So I wrote this little utility to help. Here is
  36. an example of its output :-
  37.  
  38. A:\
  39. ÃÄDAT\
  40. ³ ÃÄPHONE.DBF
  41. ³ ÀÄMISC\
  42. ³   ÃÄTX.DBF
  43. ³   ÀÄWLIST.DBF
  44. ÃÄAPP\
  45. ³ ÃÄZLOTY.OPA
  46. ³ ÃÄUTILS.OPA
  47. ³ ÀÄSUSHI2.OPA
  48. ÃÄWRD\
  49. ³ ÀÄMISC\
  50. ³   ÀÄQUOTA.WRD
  51. ÀÄOPL\
  52. 7 files in 6 directories.
  53.  
  54. Could be useful, couldn't it? Fair enough, it doesn't show dates or
  55. sizes, but it is a start. You can see which files are where, how many
  56. sub-directories you have and get a picture of the layout of your
  57. disk. (Think you've seen this utility before? Its based on one from
  58. MS-DOS, but that one doesn't show filenames.)
  59.  
  60. Okay then, how does it work?
  61.  
  62. It starts by asking which disk is to be examined, then scans that
  63. disk using the OPL command DIR$ which gives the names of the files
  64. and sub-directories belonging to a directory. i.e. the entries in the
  65. file system.  An entries depth (how far down the tree it is) can be
  66. determined by keeping a count of how many sub-directories have been
  67. used to reach it. Both these bits of information are stored in
  68. arrays; called gaName and gaDepth. (I use the 'g' to remind me that
  69. the variable is global, and the 'a' for array.) The scanning a bit
  70. time-consuming (about .5 second per entry) so the name of the
  71. directory being scanned is "BUSYed" onto the screen, to let you see
  72. what is happening.
  73.  
  74. The scanning is done recursively - that is, the procedure Descend:
  75. calls itself. This is one way of ensuring that the entire tree is
  76. checked, and also allows the array of entries to be built up in a
  77. logical order, i.e. the directory, its children, and then its peers.
  78.  
  79. Having completely scanned the disk, the arrays are used to work out
  80. the shape of the tree (ShowTree:), by comparing the relative depths
  81. of entries.
  82.  
  83. This utility could be done with no arrays, which would reduce the
  84. amount of memory required at run time, but this method would involve
  85. repeated calls to DIR$ to find the entry depth, making it very slow.
  86.  
  87. Well, thats it! I'm going to get some sleep. Good night!
  88.  
  89. P.S. By the way, the ROM:: drive I mentioned last time cannot be seen
  90. using the system directory command (psion-*). Try using Open File in
  91. World (for example) to see the names (like Agenda.App). Don't forget
  92. the Control-Tab, Control-Enter business to select the ROM:: drive.
  93. Then you can use a one-liner in OPL like COPY "ROM::AGENDA.APP", "M:"
  94. to copy it to the internal RAM drive where it is more accessible. Or
  95. you can look at it with a file viewer like HexDump. (I'll send an
  96. article about HexDump next time.)
  97.  
  98. -----------------------------------------------------------------------
  99.  
  100. Please note that this version of the utility has changed since it was
  101. published in Ipso Facto, in particular, it is now an application, and
  102. supports printing to serial or parallel printers, or to an ASCII
  103. file.
  104.  
  105. About Ipso:
  106. Ipso Facto is an independent Psion Organiser II and Series 3 user
  107. group magazine, edited by Mike O'Regan. If you wish to subscribe, or
  108. want further information, please contact him on 0602 735482, or write
  109. to Ipso Facto, 130 Stapleford Lane, Beeston, Nottingham NG9 6GB.
  110.  
  111. Keep PSIONing!
  112.  
  113.